#include<string.h>
#include<stdbool.h>

bool isSumEqual(char *firstWord, char *secondWord, char *targetWord)
{
    int m = strlen(firstWord);
    int n = strlen(secondWord);
    int o = strlen(targetWord);
    int ans1 = 0, ans2 = 0, ans3 = 0;
    int pow = 1, pow2 = 1, pow3 = 1;
    for (int i = m - 1; i >= 0; i--)
    {
        ans1 += (firstWord[i] - 97) * pow;
        pow = pow * 10;
    }
    for (int i = n - 1; i >= 0; i--)
    {
        ans2 += (secondWord[i] - 97) * pow2;
        pow2 = pow2 * 10;
    }
    for (int i = o - 1; i >= 0; i--)
    {
        ans3 += (targetWord[i] - 97) * pow3;
        pow3 = pow3 * 10;
    }
    if (ans1 + ans2 == ans3)
    {
        return true;
    }
    else
    {
        return false;
    }
}